<!DOCTYPE HTML>
<html class="bg-eee">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>支付订单</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../css/swiper.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/layer.css" />
    <link rel="stylesheet" type="text/css" href="../css/mdw.css" />
    <script type="text/javascript" src="../script/api.js"></script>
    <script type="text/javascript" src="../script/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="../script/swiper.min.js"></script>
    <script type="text/javascript" src="../script/mobile.js"></script>
    <script type="text/javascript" src="../script/layer.js"></script>
    <script type="text/javascript" src="../script/mdw.js"></script>
    <script type="text/javascript" src="../script/jumpPage.js"></script>

</head>
<body class="bg-eee">
    
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
   
</script>
<script src="https://checkout.stripe.com/checkout.js"></script>
<script type="text/javascript">

    var param={};
    apiready = function(){
        //$api.fixStatusBar($api.dom('header'));
        api.setStatusBarStyle({
            color: '#fff',//设置APP状态栏背景色
            style: 'dark'
        });
        param = api.pageParam || {};
        param.sum_price *=100;
         var order_number = param.order_number;
        var handler = StripeCheckout.configure({
            key: 'pk_live_FhOox9KYdHxpFbLyIn0tzFlu',
            image: 'http://www.maplemellow.com/Public/Home/images/stripelogo.png',
            locale: 'auto',
            currency: 'CAD',
            token: function(token) {
                pop.close();
                $.post("/Home/Pay/stripe",{stripeToken: token.id, stripeEmail: token.email,ordernumber:order_number},function (dd) {
                    alert(over);
                    over =2;
                    if(dd.code==200){
                        window.location.href=dd.url;
                    }else{
                        layer.msg(dd.msg);
                    }
                })
            }
        });
        handler.open({
            name: 'Haveit.ca',
            description: 'HAVE IT FOR YOU',
            zipCode: true,
            amount: param.sum_price,
        });


        
    };
   
</script>
<script type="text/javascript">
    
</script>
</html>